﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using DigDes.DSchool.SUPS.MVC.Models;
using DigDes.DSchool.SUPS.DataAccess.Database;

namespace DigDes.DSchool.SUPS.MVC.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Main/

        public ActionResult Index()
        {
            List<SUPSData> data = BaseDAC.GetBaseInfo();
            ViewData["data"] = data;
            return View();
        }

        [HttpPost]
        public ActionResult Index(DataModel response)
        {
            SUPSData Row = BaseDAC.GetSpecicalCar(response.CarNumber);
            ViewData["Row"] = Row;

            List<SUPSData> data = BaseDAC.GetBaseInfo();
            ViewData["data"] = data;
            return View();
        }

    }
}
